<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?=gurl('css');?>/admin.css" />
<script language="javascript" src="<?=gurl('js');?>/jq.js"></script>
<script language="javascript" src="<?=gurl('js');?>/common.js"></script>
</head>
<body>
	<h3 style="background:#E5ECF3; padding:5px; font-size:12px;">> <a href="<?=site_url(rnadminpath().'/main/show/main');?>">首页</a> > <a href="#">管理广告位</a></h3>
	<div style="margin-top:10px;padding:5px;border:1px solid #9FACB7;">
		<ul class="listmenu">
			<li style="width:60px;">选择</li>
			<li>广告位名称</li>
			<li>尺寸</li>
			<li>价格</li>
			<li>状态</li>
			<li class="lastitem" style="width:150px;">操作</li>
		</ul>
		<div class="clear"></div>
		<? if(is_array($items) && count($items)>0):?>
		<? foreach ($items as $item):?>
		<ul class="listitem">
			<li style="width:60px;"><input type="checkbox" name="id[]" id="id[]" value="<?=$item['placeid'];?>"></li>
			<li><?=$item['placename'];?></li>
			<li><?=$item['width'];?> * <?=$item['height'];?></li>
			<li><?=$item['price'];?></li>
			<li><? if($item['passed'] == 1):?><font color="Green">启用</font><? else:?><font color="Red">禁用</font><? endif;?></li>
			<li class="lastitem" style="width:150px;">
				<a href="<?=site_url(rnadminpath().'/ads/add/?placeid='.$item['placeid'].'&do=1');?>">添加广告</a>
				<a href="<?=site_url(rnadminpath().'/ads/lists/'.$item['placeid']);?>">广告列表</a>
				<a href="<?=site_url(rnadminpath().'/ads/editplace/'.$item['placeid']);?>">编辑</a>
			</li>
		</ul>
		<div class="clear"></div>
		<? endforeach;?>
		<? endif;?>
	</div>
	<div style="padding:5px;margin-top:10px;text-align:left;">
		<input type="button" onClick="checkall();" value="全选">
		<input type="button" onClick="delselected('<?=gurl(rnadminpath().'/ads/statuselected_place');?>');" value="屏蔽">
		<input type="button" onClick="delselected('<?=gurl(rnadminpath().'/ads/delselected_place');?>');" value="删除">
	</div>
	<div class="pagestring">
		<?=$pagestring;?>
	</div>
	
	<script type="text/javascript">
	function getcode(placeid, forsite, formember) {
		if(forsite == '0' && formember == '0') {
			popBox('<?=htmlspecialchars('<script language="javascript" src="'.gurl('ads/get/').'/');?>'+placeid+'"'+'<?=htmlspecialchars('></script>');?>');
		} else {
			popBox('<?=htmlspecialchars('<script language="javascript" src="'.gurl('ads/get2/').'/');?>'+placeid+'/小站ID"'+'<?=htmlspecialchars('></script>');?>');
		}
	}
    function popBox(s){
	    if(document.getElementById("popBox")==null){
	     var para=document.createElement("div");
	     para.setAttribute("id","popBox");
	     para.innerHTML="<a href='#' title='关闭' onclick='closeBox()'>关闭</a><p>"+s+"</p>";
	     document.body.appendChild(para);
	     }
    }
    function closeBox(){
	     var pop=document.getElementById("popBox");
	     pop.parentNode.removeChild(pop);
    } 
    </script>

    <style type="text/css">
     #popBox{
	      position:absolute;
	      background:#E5ECF3;
	      padding:10px;
	      top:120px;
	      left:200px;
	      border:1px solid #ccc;
	      text-align:right;
      }
    </style>
</body>
</html>
